<?php


namespace App\Http\Services\FormBuilder;

abstract class FormItem
{
    abstract public function editBlock();

    abstract public function detailBlock();
    // C端提交 & PM 端编辑
    public function editHtml() {
        $this->buildRequireTag();
        $this->editBlock();
        $this->buildSplit();
    }
    // PM 端详情 & C端预览页面
    public function detailHtml() {
        $this->buildRequireTag();
        $this->detailBlock();
        $this->buildSplit();
    }

    protected function buildSplit($content)
    {
        return ('<div class="block-header block-header-default">' .
            $content .
            '</div>'
        );
    }
}
